home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d3
/
allmac21.arc
/
CENTER10.ARC
/
CENTER10.QM
< prev
next >
Wrap
Text File
|
1990-08-27
|
6KB
|
139 lines
* Macros to Center Lines, Paragraphs and Documents, v1.0b
* CENTER10.QM
*
* Here are three handy macros to center text:
*
* @1 - Centers line, moves to next line
* @2 - Centers paragraph, moves to next paragraph
* @3 - Centers entire document
* @4 - Centers line after typing, from Kyle Watkins, SemWare
* (same as greyenter, except for use with NON-enhanced keyboards)
* greyenter - Centers line after typing, from Kyle Watkins, SemWare
* (for use with enhanced keyboards only)
* Version History:
*
* 1.1a -added greyenter to center line after typing, from Kyle Watkins,
* SemWare, for use with enahanced keyboards only.
* 1.1b -added @4 to center line after typing, from Kyle Watkins,
* SemWare, for use with NON-enahnced keyboard.
* ┌──────────────────────────────────┐
* │@1 Centers line, moves to next │
* └──────────────────────────────────┘
* To run place cursor line on desired line to center and press
* Alt & 1 at the same time.
*
@1 macrobegin *
centerline * center line
cursordown * move to next line
*
* 6 bytes Sat 08-25-1990 12:13:33
* ┌─────────────────────────────────────────────────────────────────┐
* │@2 Centers all lines in a paragraph, moves to next paragraph │
* └─────────────────────────────────────────────────────────────────┘
* To run place cursor line in a paragraph to center and press
* Alt & 2 at the same time.
*
@2 macrobegin
cursordown * move down one line
* stays in para if @ col/lin 1/1
prevpara * go to paragraph begin
CENTERPARA: *
endline begline * blank line?
Jfalse AGAIN: * if blank, go to next paragraph
centerline * center line
cursordown * move to next line
Jump CENTERPARA: * continue centering
AGAIN: *
nextpara * go to next paragraph when done
makectrofscreen * better viewing
*
* 18 bytes Sat 08-25-1990 12:13:44
* ┌─────────────────────────────────────────────────────────┐
* │@3 Centers entire document, supplied by Robert Danek │
* └─────────────────────────────────────────────────────────┘
* To run press Alt & 3 at the same time with cursor line anywhere
* in the document.
*
@3 Macrobegin * Macro to Center entire text.
endfile * Test for trailing blank lines.
LABEL0:
endline begline * " " " " " " " " "
Jtrue LABEL1: * If not, then begin centering
DelLine * Delete trailing blank.
CursorUp * Go up.
Jump LABEL0: * Retest.
LABEL1:
begfile * Go to the beginning of your text.
LABEL2:
endline begline *\ Tests whether there's anything
jtrue LABEL3: */ to center.
cursordown * If there isn't, go to next line.
jump LABEL2:
LABEL3:
MarkLine CenterLine *\ Centers the current
UnmarkBlock */ line of text.
CursorDown * Check for eof.
jfalse LABEL4: * If yes, go to ending.
jump LABEL2: * Repeat test
LABEL4:
begfile * Return to the top.
*
* 36 bytes Sat 08-25-1990 14:22:46
*┌─────────────────────────────────────────────────────────────────┐
*│ Center line after typing, from Kyle Watkins, Semware │
*└─────────────────────────────────────────────────────────────────┘
* You can use the Centerline command, to center the current line
* (based on your right margin setting) -- or use line blocking to mark a
* range of lines -- then issue the Centerline command to center the
* individual lines of the marked line block.
* If you have an enhanced keyboard, and you have QEdit using the
* enhanced keyboard, you may want to try the following macro:
greyenter macrobegin centerline endline return
*
* 7 bytes Sat 08-25-1990 17:32:31 (size added by TH)
* Now when you type your text, then press the Grey Enter Key (Far right
* hand side of your keyboard), your text will be centered as the cursor
* moves to the next line.
* This will keep your regular Enter key, to be used as normal --
* Please note that if you DO NOT have an enhanced (101 key) keyboard, with
* QEdit recognizing it as such -- then the Grey Enter and regular Enter,
* are treated as the same key.
* Hope that helps.
* --... ...--
* .......Kyle Watkins (SemWare Technical Support)
*
*┌─────────────────────────────────────────────────────────────────┐
*│ @4 Center line after typing, from Kyle Watkins, Semware │
*└─────────────────────────────────────────────────────────────────┘
* In case you do not have an enhanced keyboard, you may want to use
* the following macro instead:
*
@4 macrobegin centerline endline return
*
* 7 bytes Sun 08-26-1990 03:08:09
* Tom Hogshead Sun 08-26-1990 03:08:54